<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="TurnoCreateDlg" widgetVar="TurnoCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.CreateTurnoTitle}">

            <h:form id="TurnoCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{turnoController.selected != null}">

                        <h:outputLabel value="#{bundle.CreateTurnoLabel_nombre}" for="nombre" />
                        <p:inputText id="nombre" value="#{turnoController.selected.nombre}" title="#{bundle.CreateTurnoTitle_nombre}" required="true" requiredMessage="#{bundle.CreateTurnoRequiredMessage_nombre}"/>

                        <h:outputLabel value="#{bundle.CreateTurnoLabel_descripcion}" for="descripcion" />
                        <p:inputText id="descripcion" value="#{turnoController.selected.descripcion}" title="#{bundle.CreateTurnoTitle_descripcion}" required="true" requiredMessage="#{bundle.CreateTurnoRequiredMessage_descripcion}"/>

                        <h:outputLabel value="#{bundle.CreateTurnoLabel_horaEntrada}" for="horaEntrada" />
                        <p:calendar id="horaEntrada" pattern="HH:mm:ss" value="#{turnoController.selected.horaEntrada}" title="#{bundle.EditTurnoTitle_horaEntrada}" required="true" requiredMessage="#{bundle.EditTurnoRequiredMessage_horaEntrada}" showOn="button"/>

                        <h:outputLabel value="#{bundle.CreateTurnoLabel_horaSalida}" for="horaSalida" />
                        <p:calendar id="horaSalida" pattern="HH:mm:ss" value="#{turnoController.selected.horaSalida}" title="#{bundle.EditTurnoTitle_horaSalida}" required="true" requiredMessage="#{bundle.EditTurnoRequiredMessage_horaSalida}" showOn="button"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{turnoController.saveNew}" value="#{bundle.Save}" update="display,:TurnoListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,TurnoCreateDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="TurnoCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
